package com.github.io.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @author liry
 * @version 1.0
 * @date Created on 2022/9/13 15:32
 * Description: Api 接口信息
 */
@Data
@Accessors(chain = true)
@TableName("sb_api_data")
public class SbApiData extends BaseEntity {
    
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    
    // 接口名称
    @TableField(value = "api_name")
    private String apiName;
    
    // 接口 ip
    @TableField(value = "remote_ip")
    private String remoteIp;
    
    @TableField(value = "port")
    private Long port;
    
    // 接口 url
    @TableField(value = "url")
    private String url;
    
    // 请求方式: 1 GET、2 POST、3 PUT、4 DELETE
    @TableField("method_type")
    private String methodType;
    
    // 接口说明
    @TableField(value = "description")
    private String description;
    
    // 接口所在平台
    @TableField("platform_name")
    private String platformName;
    
    // 平台id
    @TableField("platform_id")
    private String platformId;

    @TableField(exist = false)
    private List<SbApiPathVariableData> pathVariableDataList;
    
    
    @TableField(exist = false)
    private List<SbApiHeaderData> headerDataList;
    
    @TableField(exist = false)
    private List<SbApiQueryData> queryDataList;
    
    
    @TableField(exist = false)
    private SbApiBodyData bodyData;

    @TableField(exist = false)
    private List<SbApiResultExplanationData> resultExplanationDataList;
}
